import request from "@/utils/request";


export function getAllUsers(user,page,pageSize) {
    return request({
        url: '/user/getAllUser?'+'page='+page+'&pageSize='+pageSize,
        method: 'post',
        data:user
    })
}
export function addUsers(user) {
    return request({
        url: '/user/addUsers',
        method: 'post',
        data:user
    })
}


export function changeUser(user) {
    return request({
        url: '/user/updateUser',
        method: 'post',
        data:user
    })
}

export function deleteUser(ids) {
    return request({
        url: '/user/deleteUser',
        method: 'delete',
        data:ids
    })
}

export function addUser(user) {
    return request({
        url: '/user/addUser',
        method: 'post',
        data:user
    })
}

export function register(user) {
    return request({
        url: '/user/register',
        method: 'post',
        data:user
    })
}
export function login(user) {
    return request({
        url: '/user/login',
        method: 'post',
        data:user
    })
}


export function getInfo() {
    return request({
        url: '/user/getInfo',
        method: 'get',
    })
}



export function addUserForAgency(firstNum,secondNum,thirdNum,agencyId) {
    return request({
        url: '/user/addUserForAgency?firstNum='+firstNum+"&secondNum="+secondNum+"&thirdNum="+thirdNum+"&agencyId="+agencyId,
        method: 'post',
    })
}
